import request from '@/utils/request'

// 查询利用率列表
export function listUtilization(query) {
  return request({
    url: '/optimize/utilization/list',
    method: 'get',
    params: query
  })
}

// 查询利用率详细
export function getUtilization(instanceName) {
  return request({
    url: '/optimize/utilization/' + instanceName,
    method: 'get'
  })
}

// 新增利用率
export function addUtilization(data) {
  return request({
    url: '/optimize/utilization',
    method: 'post',
    data: data
  })
}

// 修改利用率
export function updateUtilization(data) {
  return request({
    url: '/optimize/utilization',
    method: 'put',
    data: data
  })
}

// 删除利用率
export function delUtilization(instanceName) {
  return request({
    url: '/optimize/utilization/' + instanceName,
    method: 'delete'
  })
}
